
<h1><span class="yiyi-st" id="yiyi-11">numpy.ufunc.nargs</span></h1>
        <blockquote>
        <p>原文：<a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ufunc.nargs.html">https://docs.scipy.org/doc/numpy/reference/generated/numpy.ufunc.nargs.html</a></p>
        <p>译者：<a href="https://github.com/wizardforcel">飞龙</a> <a href="http://usyiyi.cn/">UsyiyiCN</a></p>
        <p>校对：（虚位以待）</p>
        </blockquote>
    
<dl class="attribute">
<dt id="numpy.ufunc.nargs"><span class="yiyi-st" id="yiyi-12"> <code class="descclassname">ufunc.</code><code class="descname">nargs</code></span></dt>
<dd><p><span class="yiyi-st" id="yiyi-13">参数的数量。</span></p>
<p><span class="yiyi-st" id="yiyi-14">数据属性包含ufunc需要的参数数量，包括可选的参数。</span></p>
<p class="rubric"><span class="yiyi-st" id="yiyi-15">笔记</span></p>
<p><span class="yiyi-st" id="yiyi-16">通常这个值会比你预期的多一个，因为所有的ufuncs都接受可选的“out”参数。</span></p>
<p class="rubric"><span class="yiyi-st" id="yiyi-17">例子</span></p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">np</span><span class="o">.</span><span class="n">add</span><span class="o">.</span><span class="n">nargs</span>
<span class="go">3</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">np</span><span class="o">.</span><span class="n">multiply</span><span class="o">.</span><span class="n">nargs</span>
<span class="go">3</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">np</span><span class="o">.</span><span class="n">power</span><span class="o">.</span><span class="n">nargs</span>
<span class="go">3</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">np</span><span class="o">.</span><span class="n">exp</span><span class="o">.</span><span class="n">nargs</span>
<span class="go">2</span>
</pre></div>
</div>
</dd></dl>
